home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 September / PCWorld_2008-09_cd.bin / domacnost a kancelar / joomla / Joomla_1.5.4-Stable-Full_Package.exe / includes / framework.php < prev    next >
PHP Script  |  2008-07-06  |  2KB  |  85 lines

  1. <?php
  2. /**
  3. * @version        $Id: framework.php 10506 2008-07-05 21:32:20Z willebil $
  4. * @package        Joomla
  5. * @copyright    Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
  6. * @license        GNU/GPL, see LICENSE.php
  7. * Joomla! is free software. This version may have been modified pursuant
  8. * to the GNU General Public License, and as distributed it includes or
  9. * is derivative of works licensed under the GNU General Public License or
  10. * other free or open source software licenses.
  11. * See COPYRIGHT.php for copyright notices and details.
  12. */
  13.  
  14. // no direct access
  15. defined( '_JEXEC' ) or die( 'Restricted access' );
  16.  
  17. /*
  18.  * Joomla! system checks
  19.  */
  20.  
  21. @set_magic_quotes_runtime( 0 );
  22. @ini_set('zend.ze1_compatibility_mode', '0');
  23.  
  24. /*
  25.  * Installation check, and check on removal of the install directory.
  26.  */
  27. if (!file_exists( JPATH_CONFIGURATION . DS . 'configuration.php' ) || (filesize( JPATH_CONFIGURATION . DS . 'configuration.php' ) < 10) || file_exists( JPATH_INSTALLATION . DS . 'index.php' )) {
  28.     if( file_exists( JPATH_INSTALLATION . DS . 'index.php' ) ) {
  29.         header( 'Location: installation/index.php' );
  30.         exit();
  31.     } else {
  32.         echo 'No configuration file found and no installation code available. Exiting...';
  33.         exit();
  34.     }
  35. }
  36.  
  37. /*
  38.  * Joomla! system startup
  39.  */
  40.  
  41. // System includes
  42. require_once( JPATH_LIBRARIES        .DS.'joomla'.DS.'import.php');
  43.  
  44. // Pre-Load configuration
  45. require_once( JPATH_CONFIGURATION    .DS.'configuration.php' );
  46.  
  47. // System configuration
  48. $CONFIG = new JConfig();
  49.  
  50. if (@$CONFIG->error_reporting === 0) {
  51.     error_reporting( 0 );
  52. } else if (@$CONFIG->error_reporting > 0) {
  53.     error_reporting( $CONFIG->error_reporting );
  54.     ini_set( 'display_errors', 1 );
  55. }
  56.  
  57. define( 'JDEBUG', $CONFIG->debug );
  58.  
  59. unset( $CONFIG );
  60.  
  61. /*
  62.  * Joomla! framework loading
  63.  */
  64.  
  65. // Include object abstract class
  66. require_once(JPATH_SITE.DS.'libraries'.DS.'joomla'.DS.'utilities'.DS.'compat'.DS.'compat.php');
  67.  
  68. // System profiler
  69. if (JDEBUG) {
  70.     jimport( 'joomla.error.profiler' );
  71.     $_PROFILER =& JProfiler::getInstance( 'Application' );
  72. }
  73.  
  74. // Joomla! library imports;
  75. jimport( 'joomla.application.menu' );
  76. jimport( 'joomla.user.user');
  77. jimport( 'joomla.environment.uri' );
  78. jimport( 'joomla.html.html' );
  79. jimport( 'joomla.utilities.utility' );
  80. jimport( 'joomla.event.event');
  81. jimport( 'joomla.event.dispatcher');
  82. jimport( 'joomla.language.language');
  83. jimport( 'joomla.utilities.string' );
  84. ?>
  85.